
<template>
  <div class="nav-wrap">
    <div class="title-wrap" @click="goIndexPage">
      <img src="../assets/img/logo-ionic.png" alt />
      <span>车轮子UI</span>
    </div>
    <div class="nav-item">
      <span>文档</span>
      <span>组件</span>
      <span>主题</span>
      <span>资源</span>
    </div>
  </div>
</template>

<script>
// import { router } from 'vue-router'
export default {
  name: "TapNav",
  // setup() {
  //   const router = useRouter()
  //   const goIndexPage = () => {
  //     // this.$router.push("/index");
  //     router.push({
  //       path: '/components'
  //     });
  //   };
  //   return {
  //     goIndexPage,
  //   };
  // },
};
</script>

<style lang='scss' scoped>
.nav-wrap {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 10px auto;
  z-index: 1;

  > .nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    > span {
      padding: 10px;
      color: #999;
      font-weight: 400;
      cursor: pointer;
      &:hover {
        color: #4bc0c8;
      }
    }
  }

  > .title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;

    > img {
      width: 40px;
      height: 40px;
    }

    > span {
      margin-left: 20px;
      color: #333;
      font-size: 18px;
      font-weight: 500;
      cursor: pointer;
    }
  }
}
</style>